#ifndef SERIALEXECUTABLE_H
#define SERIALEXECUTABLE_H
#include "ExeLib.h"

#include "ExecutableSupport.h"

#include <QTextStream>
class QIODevice;

class EXESHARED_EXPORT SerialExecutable : public ExecutableSupport
{
    Q_OBJECT
public:
    explicit SerialExecutable(QObject * parent);
    SerialExecutable(QIODevice * ioDevice,
                     QObject * parent);

    void setDevice(QIODevice * ioDevice);
    QIODevice * device(void);
    QTextStream * stream(void);
    QString readLine(void);
    QTextStream & writeLine(const QString & string=QString());

signals:

public slots:
    void initialize(void);
    void setup(void);
    void start(void);

private:
    QIODevice * _io_p;
    QTextStream _stream;
};

#endif // SERIALEXECUTABLE_H
